package com.chaihu.order;

import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.chaihu.bean.dto.order.AppDto;
import com.chaihu.bean.dto.order.OrderDto;
import com.chaihu.order.dao.AppServiceDao;
import com.chaihu.order.dao.OrderServiceDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author chaihu
 * @date 2021/10/15
 */
@RestController
public class TestController {
    @Autowired
    private OrderServiceDao orderServiceDao;
    @Autowired
    private AppServiceDao appServiceDao;

    @RequestMapping(value = "/get0", method = RequestMethod.GET)
    public ResponseEntity<Void> get2() {
        LambdaQueryWrapper<OrderDto> wrapper = new LambdaQueryWrapper<>();
        List list = orderServiceDao.selectList(wrapper);
        LambdaQueryWrapper<AppDto> wrapper1 = new LambdaQueryWrapper<>();
        appServiceDao.selectList(wrapper1);
        System.out.println(JSON.toJSONString(list));
        System.out.println("get");
        return null;
    }
}
